\(\int \csc (2 a+2 b x) \sin (a+b x) \, dx\) [8]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 14 \[ \int \csc (2 a+2 b x) \sin (a+b x) \, dx=\frac {\text {arctanh}(\sin (a+b x))}{2 b} \]

[Out]

1/2*arctanh(sin(b*x+a))/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4373, 3855} \[ \int \csc (2 a+2 b x) \sin (a+b x) \, dx=\frac {\text {arctanh}(\sin (a+b x))}{2 b} \]

[In]

Int[Csc[2*a + 2*b*x]*Sin[a + b*x],x]

[Out]

ArcTanh[Sin[a + b*x]]/(2*b)

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4373

Int[((f_.)*sin[(a_.) + (b_.)*(x_)])^(n_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/f^p, Int[Cos[a
+ b*x]^p*(f*Sin[a + b*x])^(n + p), x], x] /; FreeQ[{a, b, c, d, f, n}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \int \sec (a+b x) \, dx \\ & = \frac {\text {arctanh}(\sin (a+b x))}{2 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int \csc (2 a+2 b x) \sin (a+b x) \, dx=\frac {\text {arctanh}(\sin (a+b x))}{2 b} \]

[In]

Integrate[Csc[2*a + 2*b*x]*Sin[a + b*x],x]

[Out]

ArcTanh[Sin[a + b*x]]/(2*b)

Maple [A] (verified)

Time = 0.38 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.43

method result size
default \(\frac {\ln \left (\sec \left (x b +a \right )+\tan \left (x b +a \right )\right )}{2 b}\) \(20\)
risch \(-\frac {\ln \left ({\mathrm e}^{i \left (x b +a \right )}-i\right )}{2 b}+\frac {\ln \left (i+{\mathrm e}^{i \left (x b +a \right )}\right )}{2 b}\) \(38\)

[In]

int(csc(2*b*x+2*a)*sin(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/2/b*ln(sec(b*x+a)+tan(b*x+a))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 28 vs. \(2 (12) = 24\).

Time = 0.25 (sec) , antiderivative size = 28, normalized size of antiderivative = 2.00 \[ \int \csc (2 a+2 b x) \sin (a+b x) \, dx=\frac {\log \left (\sin \left (b x + a\right ) + 1\right ) - \log \left (-\sin \left (b x + a\right ) + 1\right )}{4 \, b} \]

[In]

integrate(csc(2*b*x+2*a)*sin(b*x+a),x, algorithm="fricas")

[Out]

1/4*(log(sin(b*x + a) + 1) - log(-sin(b*x + a) + 1))/b

Sympy [F(-1)]

Timed out. \[ \int \csc (2 a+2 b x) \sin (a+b x) \, dx=\text {Timed out} \]

[In]

integrate(csc(2*b*x+2*a)*sin(b*x+a),x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (12) = 24\).

Time = 0.31 (sec) , antiderivative size = 115, normalized size of antiderivative = 8.21 \[ \int \csc (2 a+2 b x) \sin (a+b x) \, dx=-\frac {\log \left (\frac {\cos \left (b x + 2 \, a\right )^{2} + \cos \left (a\right )^{2} - 2 \, \cos \left (a\right ) \sin \left (b x + 2 \, a\right ) + \sin \left (b x + 2 \, a\right )^{2} + 2 \, \cos \left (b x + 2 \, a\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}}{\cos \left (b x + 2 \, a\right )^{2} + \cos \left (a\right )^{2} + 2 \, \cos \left (a\right ) \sin \left (b x + 2 \, a\right ) + \sin \left (b x + 2 \, a\right )^{2} - 2 \, \cos \left (b x + 2 \, a\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}}\right )}{4 \, b} \]

[In]

integrate(csc(2*b*x+2*a)*sin(b*x+a),x, algorithm="maxima")

[Out]

-1/4*log((cos(b*x + 2*a)^2 + cos(a)^2 - 2*cos(a)*sin(b*x + 2*a) + sin(b*x + 2*a)^2 + 2*cos(b*x + 2*a)*sin(a) +
 sin(a)^2)/(cos(b*x + 2*a)^2 + cos(a)^2 + 2*cos(a)*sin(b*x + 2*a) + sin(b*x + 2*a)^2 - 2*cos(b*x + 2*a)*sin(a)
 + sin(a)^2))/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 28 vs. \(2 (12) = 24\).

Time = 0.26 (sec) , antiderivative size = 28, normalized size of antiderivative = 2.00 \[ \int \csc (2 a+2 b x) \sin (a+b x) \, dx=\frac {\log \left (\sin \left (b x + a\right ) + 1\right ) - \log \left (-\sin \left (b x + a\right ) + 1\right )}{4 \, b} \]

[In]

integrate(csc(2*b*x+2*a)*sin(b*x+a),x, algorithm="giac")

[Out]

1/4*(log(sin(b*x + a) + 1) - log(-sin(b*x + a) + 1))/b

Mupad [B] (verification not implemented)

Time = 19.33 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.86 \[ \int \csc (2 a+2 b x) \sin (a+b x) \, dx=\frac {\mathrm {atanh}\left (\sin \left (a+b\,x\right )\right )}{2\,b} \]

[In]

int(sin(a + b*x)/sin(2*a + 2*b*x),x)

[Out]

atanh(sin(a + b*x))/(2*b)